package org.csu.secondhand.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeUtil {
    public static String getTime() {
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return df.format(new Date()).toString();
    }
    public static String getDate() {
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
        return df.format(new Date()).toString();
    }

    public static void main(String[] args) {
        System.out.println(getTime());
        System.out.println(getDate());
    }
}
